<?php
Yii::app()->clientScript->registerScript('search',
        "$('form#search_pajak').submit(function()
            {
                $.fn.yiiGridView.update('pajak-grid',{
                data:$(this).seriallize()
                });
                return false;
            });
        ");    
?>

<h1>Kelompok Pajak</h1>

<?php $this->renderPartial('_search',array('model'=>$model,));?>

<?php 
$this->widget('bootstrap.widgets.TBGridView', array(
    'id' => 'pajak-grid',
    'dataProvider' => $model->search(),
    'type' => 'striped bordered condensed',
    'columns' => array(
        array(
            'header' => 'Kode Pajak',
            'name' => 'kode_pajak',
        ),
        array(
            'header' => 'Nama Pajak',
            'name' => 'nama_pajak',
        ),
        array(
            'header' => 'Kode Pajak Daerah',
            'name' => 'kode_pajak_daerah',
        ),        
        array(
            'class' => 'bootstrap.widgets.TbButtonColumn',
            'template' => '{update} ',
            'buttons' => array(
                'update' => array(
                    'url' => 'Yii::app()->createUrl("MasterFile/Pajak/update", array("id"=>$data->kode_pajak))',
                ),
            ),
            'htmlOptions' => array('style' => 'width: 8%;text-align: center;'),
        ),
        array(
            'class' => 'bootstrap.widgets.TbButtonColumn',
            'template' => '{delete} ',
            'buttons' => array(
                'delete' => array(
                    'url' => 'Yii::app()->createUrl("MasterFile/Pajak/delete", array("id"=>$data->kode_pajak))',
                ),
            ),
            'htmlOptions' => array('style' => 'width: 8%;text-align: center;'),
        )
    )
));
?>

<?php
$this->widget('bootstrap.widgets.TbButton', array(
    'type' => 'success',
    'icon' => 'icon-plus-sign',
    'label' => 'Tambah Pajak',
    'url' => Yii::app()->createUrl('/MasterFile/Pajak/create'),
    'htmlOptions' => array('style' => 'margin-top:20px'),
));
?>